#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define N 1000000000

int main() {
  double a1 = 1.0, b1 = 1.0/(sqrt(2)), b2, t = 0.25, a2;
  long long p = 1;
  int i;
  for(i=0; i<N; i++) {
    a2 = (a1 + b1)/2.0;
    b2 = sqrt(a1*b1);
    t = t - p*(a1 - a2)*(a1 - a2);
    if (i < 1023)
    p = p << 1;
    a1 = a2;
    b1 = b2;
  }
  double pi = (a2 + b2)*(a2 + b2)/(4.0*t);
  printf("%.6lf\n", pi);
  return 0;
}
